﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using IBatisNet.DataMapper;
using TumbaloSoft.Models;

namespace TumbaloSoft.Helpers
{
    public class HelperMoneda
    {
        
    
        public static IList selectAll()
        {
            return Mapper.Instance().QueryForList("MonedaSelectAll", null);       
        }
        public static int selectMaxCodigo()
        {
            return (int)Mapper.Instance().QueryForObject("MonedaSelectMaxCodigo", null);
        }


        static public int SiguienteCodigo()
        {
            return (int)Mapper.Instance().QueryForObject("MonedaSiguienteCodigo", null);
        }

        public static Moneda selectById(int id)
        {
            IList monedas = Mapper.Instance().QueryForList("MonedaSelectById", id);
            Moneda moneda = (Moneda)(monedas[0]);
            return moneda;
        }   

    }
}